package jm.data.structure.queue;

/**
 * @Description 双端队列测试
 * @date 2022/4/8 9:08
 */
public class MainDeque {
    public static void main(String[] args) {
        Deque<Integer> deque = new Deque<>();

        deque.enQueueFront(1);
        deque.enQueueFront(2);
        deque.enQueueFront(3);

        /*尾  1 2 3  头*/

        deque.enQueueRear(9);
        deque.enQueueRear(8);
        deque.enQueueRear(7);
        /*尾 7 8 9 1 2 3 头*/

        while (!deque.isEmpty()){
            System.out.println(deque.deQueueFront());
        }
    }
}
